Numerical control apparatus

ABSTRACT

In a numerical control apparatus, tools to be used are sequentially read out from a tool order list in accordance with an order of tools to be used (S2, S9), and blocks read out from the source program and using the tools are searched (S3, S6). A new program is created in accordance with a designated tool order (S4), and machining commands are generated by the new program.

BACKGROUND OF THE INVENTION

The present invention relates to a numerical control apparatus used in amachine tool.

A plurality of tools are used in a machine tool to machine a workpiece.In this case, when tools are frequently replaced, it takes a long timefor tool replacement, thus prolonging machining time and degradingefficiency. In order to decrease the number of times tool replacementoccurs, the machining operation as a whole is analyzed to create aprogram. In this case, all the machining steps must be analyzed tocreate the program, so that program creation results in time-consumingand cumbersome operations. A recently developed program created by aconversation type automatic program function requires a larger number oftool replacement times as compared with a program created by general NCcommands.

For example, as shown in FIG. 1, in a program wherein holes A are formedin hole positions P1 to P8 of a workpiece W, and holes B, having adifferent diameter from that of the holes A, are formed in holepositions P9 and P10 thereof, respectively, a program created by aconversational format which does not consider the number of toolreplacement times is required, as shown in FIG. 2. When thisconversationally created program is executed, a tool T1 (center drill)is used to form small holes in the hole positions P1 to P8, and the toolT1 is replaced with a tool T2 (drill). The tool T2 is then used to formthe holes A. The tool T2 is replaced with the tool T1 again, and thetool T1 (center drill) is used to form small holes in the hole positionsP9 and P10. Thereafter, the tool T1 is replaced with a tool T3 (drill),and the tool T3 is used to form the holes in the hole positions P9 andP10.

According to the above program, the tool T1 is replaced twice, so thatthe number of tool replacement times becomes three, thus increasing thetool replacement time and hence the total machining time.

SUMMARY OF THE INVENTION

It is an object of the present invention to solve the above conventionaldrawback, by providing a numerical control apparatus, wherein the numberof tool replacement times can be minimized.

It is another object of the present invention to provide a numericalcontrol apparatus wherein the number of tool replacement times can beminimized within a designated range by designating all or part of asource program for machining.

In order to achieve the above objects of the present invention, there isprovided a numerical control apparatus comprising: source programstorage means for storing a source program which is not processed todesignate a minimum number of tool replacement times; tool order settingmeans for storing data representing the order in which tools are to beused in machining in accordance with the source program; tool orderchange command means for generating a change command for changing theorder of tools used in machining; program updating means for receivingthe change command from said tool order change command means and forupdating the source program in accordance with the order designated bysaid tool order setting means; and tool order updated program storagemeans for storing the updated source program. The numerical controlapparatus further comprises tool order change range designating meansfor designating a range of a tool order change.

In the numerical control apparatus of the present invention, a toolorder list is entered by tool numbers or the like at the tool ordersetting means, the tool order change range is entered by sequencenumbers or the like of the source program at the tool order change rangedesignating means, and the change command is entered at the tool orderchange command means. Upon reception of these inputs, the programupdating means edits the source program within the change range inaccordance with the designated tool order, and causes the tool orderupdated program storage means to store the updated program. An output isgenerated in accordance with the updated program so as to perform NCmachining by with a minimum number of tool replacement times.

According to the numerical control apparatus of the present invention,when the tool order list and the tool order change range are designated(when the entire area of the source program is designated, the toolorder change range corresponds to the entire source program area), theprogram is edited to cause the machine tool to perform operation inaccordance with the designated tool order. After a tool is used once, itneed not be replaced again. As a result, the tool replacement time canbe decreased, thereby shortening the total machining time.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a plan view for explaining a machining example;

FIG. 2 is a diagram of a conventional program which does not control soas to minimize the number of tool replacement times;

FIG. 3 is a chart for explaining the operation of a numerical controlapparatus according to an embodiment of the present invention;

FIGS. 4 and 5 are respectively a plan view and a sectional view forexplaining a machining example according to the present invention;

FIG. 6 is a block diagram of the numerical control apparatus accordingto an embodiment of the present invention; and

FIG. 7 is a flow chart for explaining the processing performed by theapparatus shown in FIG. 6.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

FIG. 3 is a chart for explaining the operation of the numerical controlapparatus according to an embodiment of the present invention. When theholes A and B are formed at the hole positions P1 to P10 of theworkpiece W shown in FIG. 1, a source program created in aconversational format is illustrated as a program (O1000) of FIG. 3. Inthe numerical control apparatus of this embodiment, an order of toolsused in machining is designated by a tool order list R by means of toolnumbers or the like to edit the source program and to produce a newprogram (O2000). The holes are formed in accordance with the new program(O2000). More particularly, all operations with the first tool T1designated by the tool order list R are performed. In this case, thesmall holes are formed by the tool T1 at the hole positions P1 to P8 andthe hole positions P9 and P10. Subsequently, the tool T2 is selected toform the holes A at the hole positions P1 to P8, respectively. Finally,the tool T3 is selected to form the holes B at the hole positions P9 andP10, respectively. The tools from the tool T1 to the tool T3 arereplaced only twice. The tool replacement can be decreased to two times,as compared with the source program (O1000) which requires toolreplacement three times. When many tools are used in complicatedmachining and some of the tools are commonly used, the total number ofreplacement times can be decreased, thereby shortening the totalmachining time.

As shown in FIGS. 4 and 5, when small holes A are formed at holepositions P23 to P26 after the large holes B are formed at holepositions P21 and P22, respectively, the program can be edited inaccordance with the tool order, as shown in FIG. 3. More particularly,if the tool T1 is used to form the holes A at the hole positions P23 toP26, and the next tool T3 is used to form the large holes at thepositions P21 and P22, the small holes A (P23 to P26) formed in thebottom surfaces as the hole positions P21 and P22 will disappear. Inorder to prevent this, the sequence numbers of the source program aredesignated to edit the program in accordance with the tool order list,thereby designating the editing range.

FIG. 6 is a block diagram of the hardware for the numerical controlapparatus according to an embodiment of the present invention. Referencenumeral 1 denotes a central processing unit (CPU); and 2, a ROM forstoring a control program for controlling the overall operation. The CPU1 and the ROM 2 constitute a program updating means for updating thesource program to a new program in accordance with the control programstored in the ROM 2. Reference numeral 3 denotes a RAM for storingprocessed data and the tool order list R. Reference numeral 4 denotes astorage means for storing source and new programs. The storage means 4comprises a programmable nonvolatile memory. In this embodiment, thenonvolatile memory 4 comprises a bubble memory. Reference numeral 5denotes a display unit (CRT) for displaying a program when the programis created in a conversational format. Soft keys are arranged in thedisplay unit 5 to change the tool order. Reference numeral 6 denotes akeyboard which constitutes the tool order setting means, the tool orderchange range setting means and the tool order change command means forentering the program tool order list, the tool order change designationrange and the tool order change command. Reference numeral 7 denotes aninput/output circuit for connecting the numerical control apparatus to amachine tool; and 8, a bus.

The operation of the numerical control apparatus having the arrangementdescribed above will be described hereinafter.

Assume that a program created by the conversational operation or thesource program (O1000) which does not consider the number of toolreplacement times, shown in FIGS. 2 and 3 is stored in the bubble memory4 through a tape reader (not shown). The tool numbers in terms of theorder of tools used in machining are entered as the tool order list R atthe keyboard 6 and are stored in the RAM 3. The tool order change softkey on the display unit 5 is operated. Thereafter, the sequence numbersof the start and end blocks of the range of the source program subjectedto change in tool order, are entered at the keyboard 6. The CPU 1 storesthe sequence numbers of the start and end blocks and searches for thestart sequence number of the designated range subjected to the change intool order. Data of the source program (O1000) up to the start sequencenumber is copied and is stored as a new program (O2000) in anothermemory area in the bubble memory 4. After the start sequence number, theoperation shown in FIG. 7 is performed. A tool number of the first toolT1 is read out (step S2) as a parameter i=1 (step S1) from the toolorder list R stored in the RAM 3. Subsequently, the CPU 1 checks whetheror not the block represented by the start sequence number of the program(O1000) corresponds to the block for using the tool T1, i.e.,corresponds to the block assigned with the tool number of the tool T1(step S3). If YES in step S3, the corresponding block is retrieved andadded to the new program (O2000) (step S4).

The CPU 1 then checks whether or not the designated range subjected tothe change in tool order is entirely checked, i.e., the sequence numberof the end block among the designated sequence numbers is checked (stepS5). If NO in step S5, the next block is searched, and the steps S3 andS4 are executed again. When the designated range is entirely checked forthe first tool T1, and the new program (O2000) is created, the parameteri is updated to 2, so that the same operation as described above isperformed for the second tool T2. When the above operation is performedfrom the start to end block sequence numbers for all the toolsrepresented by the tool order change list R (steps S5 and S7), theprogram (O000) is stored in the bubble memory 4 in accordance with thedesignated tool order. The program (O000) after the end block sequencenumber is shifted to the new program (O000), so that the new program(02000) is completed and stored in the bubble memory 4. In this state,the source program (O000) is left in the bubble memory 4. However, thisprogram may be deleted by tape editing if required.

In the above embodiment, the tool order change designation range is one.However, when a plurality of tool order change designation ranges areentered, the CPU 1 searches from the start block sequence number to theend block sequence number of each tool order change designation range.During this period, the operation shown in FIG. 7 has been performed.The program portion excluding the tool order change designation rangescan be shifted to the new program.

What is claimed is:
 1. A numerical control apparatus comprising:sourceprogram storage means for storing a source program which includes aplurality of blocks and is not prepared to effect machining with aminimum number of tool replacement times; tool order setting means,operable by an operator, for setting the order in which tools are to beused in machining; tool order change command means, operable by theoperator, for generating a change command for changing the set order inwhich tools are used in machining; tool order change range designatingmeans, operable by the operator, for designating at least one set ofstart and end blocks defining at least one program updating range of thesource program to be subjected to change in tool order; program updatingmeans for receiving the change command from said tool order changecommand means, and for updating for every block at least one portion ofthe source program falling within the at least one program updatingrange in accordance with the order designated by said tool order settingmeans; and tool order updated program storage means for storing theupdated source program.
 2. An apparatus according to claim 1, whereinsaid program updating means comprises a central processing unit and amemory connected to said central processing unit.
 3. A numerical controlapparatus according to claim 2, wherein said tool order setting meansand said tool order change command means are formed by a keyboard.
 4. Anapparatus according to claim 3, wherein said tool order updated programstorage means comprises a bubble memory.
 5. An apparatus according toclaim 1, wherein said tool order setting means, said tool order changecommand means and said tool order change range designating means areformed by a keyboard.
 6. An apparatus according to claim 5, wherein saidtool order updated program storage means comprises a bubble memory.
 7. Amethod of editing a source program which includes a plurality of blocks,for a numerical control apparatus, comprising the steps of:(a) settingthe order in which tools are to be used in machining; (b) generating achange command for changing the set order in which tools are to be usedin machining; (c) designating at least one set of start and end blocksdefining at least one program updating range of the source program to besubjected to a change in tool order; (d) automatically updating forevery block at least one portion of the source program falling withinthe at least one program updating range, in accordance with the orderdesignated in said step (a); and (e) storing the updated source program.